<extend name="Public:base"/>

<block name="main">
<div id="yzh-content" class="col-xs-12">
    <div class="main-title">
        <h2>模版管理</h2>
    </div>

    <div class="table-actions">
        <a href="{:U('Template/index')}" class="btn btn-primary btn-sm">模板管理</a>
        <a href="{:U('Template/images')}" class="btn btn-primary btn-sm">风格管理</a>
        <a href="{:U('Template/config')}" class="btn btn-primary btn-sm">模板配置</a>
        <a href="{:U('Template/add')}" class="btn btn-primary btn-sm">新增</a>

        <div class="btn-group pull-right" role="group">
            <volist name="Lang" id="r">
                <a href="{:U('Template/index','l='.$r['mark'])}" class="btn btn-sm btn-primary <if condition="$l==$r['mark']">active</if>">{$r['name']}</a>
            </volist>
        </div>
    </div>

    <table class="table table-bordered table-hover table-condensed">
      <thead>
        <tr>
          <th style="text-indent:10px;">{:L(file_name)}</th>
          <th>{:L(file_size)}</th>
          <th>{:L(file_time)}</th>
          <th class="center table-cell-2">{:L(manage)}</th>
        </tr>
      </thead>

      <tbody>
        <volist name="templates" id="vo">
        <tr>
          <td style="text-indent:10px;">{$vo.filename}</td>
          <td>{$vo.filesize}</td>
          <td>{$vo.filemtime|toDate=###,'Y-m-d H:i:s'}</td>
          <td class="center table-cell-2">
          <a href="{:U($module_name.'/edit?file='.$vo[filename])}" class="btn btn-info btn-xs">编辑</a>
          <a href="javascript:confirm_delete('{:U($module_name.'/delete?file='.$vo[filename])}')" class="btn btn-danger btn-xs">删除</a></td>
        </tr>
        </volist>
      </tbody>
    </table>
</div>
</block>